package 左哥算法.compare.comparator;

import java.util.*;

public class Args {
    static Random r=new Random();
//    static Map<String,Config> config=new HashMap<>();
//    public int single(int range){
//
//    }范围
    public Integer[] nextInts(int count,int range){
        Integer[] res=new Integer[count];
        for (int i = 0; i < res.length; i++) {
            res[i]=r.nextInt(range)+1;
        }
        return res;
    }
    public Integer[] nextNoRsdInts(int count,int range){
        Integer[] res = new Integer[count];
        Set<Integer> set=new HashSet<>();
        while (set.size()<count){
            set.add(r.nextInt(range)+1);
        }
        return set.toArray(res);
    }
    public Integer nextInt(int range){
        return r.nextInt(range);
    }
}
